projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df029b4
)
Sleep before unlinking to fix a flaky test on windows
author
Brian Anderson
<banderson@mozilla.com>
Thu, 11 Dec 2014 23:16:43 +0000
(15:16 -0800)
committer
Brian Anderson
<banderson@mozilla.com>
Thu, 11 Dec 2014 23:16:43 +0000
(15:16 -0800)
tests/test_cargo_compile.rs
patch
|
blob
|
history
diff --git
a/tests/test_cargo_compile.rs
b/tests/test_cargo_compile.rs
index 225c8c5bd44be73b74ff168541f0ba4d640fc8cc..b87f080361f9d1f5050678b13e37abe082b49726 100644
(file)
--- a/
tests/test_cargo_compile.rs
+++ b/
tests/test_cargo_compile.rs
@@
-1509,6
+1509,12
@@
test!(compile_then_delete {
assert_that(p.cargo_process("run"), execs().with_status(0));
assert_that(&p.bin("foo"), existing_file());
+ if cfg!(windows) {
+ // HACKHACK: On windows unlinking immediately after running often fails, so sleep
+ use std::io::timer::sleep;
+ use std::time::duration::Duration;
+ sleep(Duration::milliseconds(100));
+ }
fs::unlink(&p.bin("foo")).unwrap();
assert_that(p.process(cargo_dir().join("cargo")).arg("run"),
execs().with_status(0));